﻿@model IEnumerable<WSCeCommerce.Domain.Item>
@using WSCeCommerce.Domain;
@using WSCeCommerceWeb.Helpers;
@using WSCeCommerceWeb.Models;
@using WSCeCommerceWeb.Controllers;

@{
    ViewBag.Title = "Browse";
   
}

<h2 style="text-align:center">Browse</h2>
<table>
    <tr>
        <th>Item Number</th>
        <th>Price</th>
        <th>Add to Cart</th>
    </tr>
    @foreach (var item in Model)
    {
        <tr>
            <td>
                @Html.DisplayFor(modelItem => item.Name)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Price)
            </td>
            <td>
                <input type="button" value="Add To Cart" onclick="AddToCart(@item.ItemId)" />
            </td>
        </tr>
    }
</table>
<h3 style="text-align:right">@Html.ActionLink("Back to Categories","Index")</h3>
